<template>
    <div class="info">
      <h2>考试与入厂信息</h2>
      <p><strong>姓名：</strong>{{ data.realName }}</p>
      <p><strong>手机号：</strong>{{ data.phone }}</p>
      <p><strong>身份证号：</strong>{{ data.idCard }}</p>
      <p><strong>公司：</strong>{{ data.companyName }}</p>
      <p><strong>工种：</strong>{{ data.jobType }}</p>
      <p><strong>工作区域：</strong>{{ data.workArea }}</p>
      <p><strong>入厂时间：</strong>{{ data.entryTime }}</p>
      <p><strong>离厂时间：</strong>{{ data.leaveTime }}</p>
      <p><strong>考试名称：</strong>{{ data.title }}</p>
      <p><strong>是否通过：</strong>{{ data.passed ? '通过' : '未通过' }}</p>
      <p><strong>考试时间：</strong>{{ data.updateTime }}</p>
    </div>
  </template>
  
  <script>
  export default {
    data() {
      return {
        data: {}
      }
    },
    mounted() {
      try {
        const raw = this.$route.query.data
        this.data = JSON.parse(decodeURIComponent(raw))
      } catch (e) {
        this.data = {}
      }
    }
  }
  </script>
  
  <style scoped>
  .info {
    padding: 20px;
    font-size: 18px;
  }
  .info p {
    margin: 10px 0;
  }
  </style>
  